package cn.zxcoder.entity.pay;

import cn.zxcoder.entity.goods.Product;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author zx
 * @since 2023-05-10
 */
@Data
@TableName(value = "pay_order")
@ApiModel(value = "Order对象", description = "订单管理中的交易订单表")
public class Order extends CnfInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "order_id")
    @ApiModelProperty("订单号")
    private String orderId;

    @TableField(value = "deal_num")
    @ApiModelProperty("交易单号")
    private String dealId;

    @TableField(value = "deal_mode")
    @ApiModelProperty("交易类型")
    private String dealMode;

    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    @ApiModelProperty("创建时间")
    private Date addTime;

    @ApiModelProperty("备注")
    private String remark;

    @TableField(value = "dept_id")
    @ApiModelProperty("部门id")
    private Integer deptId;

    @TableField(exist = false)
    @ApiModelProperty("部门名称")
    private String deptName;


    @TableField(value = "product_id")
    @ApiModelProperty("商品id")
    private Integer productId;

    @TableField(exist = false)
    @ApiModelProperty("商品价格")
    private String goodsPrice;

    @TableField(exist = false)
    @ApiModelProperty("支付金额")
    private String payAmount;

    @TableField(exist = false)
    @ApiModelProperty("商品名称")
    private String goodsName;

    @TableField(value = "cnfinfo_id")
    @ApiModelProperty("支付配置信息id")
    private Integer cnfinfoId;

    @TableField(value = "cnf_id")
    @ApiModelProperty("支付配置id")
    private Integer cnfId;

    @TableField(exist = false)
    @ApiModelProperty("签名秘钥")
    private String secertKey;

    @TableField(exist = false)
    @ApiModelProperty("商户号")
    private String merchantCode;

    @TableField(exist = false)
    @ApiModelProperty("子商户号")
    private String subCode;

    @TableField(exist = false)
    @ApiModelProperty("卖家")
    private String merchantName;


    @TableField(value = "stat_id")
    @ApiModelProperty("订单状态id")
    private Integer statId;

    @TableField(exist = false)
    @ApiModelProperty("订单状态名称")
    private String statName;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
    public String getDealId() {
        return dealId;
    }

    public void setDealId(String dealId) {
        this.dealId = dealId;
    }
    public String getDealMode() {
        return dealMode;
    }

    public void setDealMode(String dealMode) {
        this.dealMode = dealMode;
    }
    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
    public Integer getDeptId() {
        return deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }
    public Integer getCnfinfoId() {
        return cnfinfoId;
    }

    public void setCnfinfoId(Integer cnfinfoId) {
        this.cnfinfoId = cnfinfoId;
    }
    public Integer getCnfId() {
        return cnfId;
    }

    public void setCnfId(Integer cnfId) {
        this.cnfId = cnfId;
    }

    @Override
    public String toString() {
        return "Order{" +
            "id=" + id +
            ", orderId=" + orderId +
            ", dealId=" + dealId +
            ", dealMode=" + dealMode +
            ", addTime=" + addTime +
            ", remark=" + remark +
            ", deptId=" + deptId +
            ", productId=" + productId +
            ", cnfinfoId=" + cnfinfoId +
            ", cnfId=" + cnfId +
        "}";
    }
}
